package com.example.akka.master;

import akka.actor.UntypedActor;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("masterActor")
@Scope("prototype")
public class MasterActor extends UntypedActor {

    @Override
    public void onReceive(Object message) throws Exception {
        if (message instanceof AkkaResp) {
            System.out.println("get resp:"+((AkkaResp) message).getData());
        } else {
            unhandled(message);
        }
    }
}
